package com.fengli.task.uitl.auth.bean;


import com.fengli.task.entity.UserEntity;

import java.util.Collections;

/**
 * @Description:
 * @Author: fengli
 * @Date 4/21/19 3:30 PM
 */
public class CustomUserDetails extends org.springframework.security.core.userdetails.User {

    private UserEntity user;

    public CustomUserDetails(UserEntity user) {
        super(user.getEmail(), user.getPassword(), true, true, true, true, Collections.EMPTY_SET);
        this.user = user;
    }

    public UserEntity getUser() {
        return user;
    }

    public void setUser(UserEntity user) {
        this.user = user;
    }
}
